Auto figure out things like simXX and port numbers. 🔼

Makes it a lot easier to enable and disable sims, and re arrange them.


reported=2021-05-28 06:38:12

reporter=onefang

priority=high

category=Feature

severity=feature

resolution=fixed


2021-06-13 18:06:39 onefang: There's no command line option to provide port numbers, or .ini constants.  So could just create a temporary .ini file to pass to -inifile.

Use the sorted order and number number field in sims.lua to calculate ports on startup.

Soooo -

sim number = 0

if first sim in [type] then

if [number] then sim number = [number]

HTTP = sim number x 2, UDP = sim number x 2 + 1

sim number ++


2021-06-30 20:13:24 onefang: Hmmm, changing the Const.mysim number currently means the log files end up with random sims in them.  So use the tmux short names for the logs.


2021-06-30 20:32:15 onefang: etc/sims.lua -

[code=Lua]

sims = -- Note these are .shini / tmux tab short names.

{

{["type"] = "Important"; "Welcome", "Sandbox", "Shops"},

{["type"] = "Rentals"; "Karen", "Bob"},

{["type"] = "Freebies"; "Gifts", "Free"},

{["type"] = "unsorted"; "New"}, -- NOTE - this is where new ones go to by default.

{["type"] = "Water"; ["number"] = 90; "Water0", "Water1", "Water2", "Water3", "Water4"},

{["type"] = "Heavies"; ["number"] = 70; "DP", "ARSE"},

}

[/code]


2021-07-01 16:19:37 onefang: Note I am not using RegionType.  While CG has things set up that way it would be useful, other grids might not.  I tend to use "owners name private sim" or some such.  CG would still have to configure which order which types start in anyway.